-- GENERATED SPELL FOR [Unbound Ancient] --


function spell0_30861(pUnit, Event) --@Entangling Roots,n/a--
pUnit:FullCastSpellOnTarget(33844,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30861', 6500, 1)
end

function spell1_30861(pUnit, Event) --@Trample,n/a--
pUnit:FullCastSpellOnTarget(51944,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30861', 583, 1)
end

function Sorts_30861(pUnit, Event)
local choix_sorts_30861 = math.random(0, 1)
if choix_sorts_30861 == 0 then
pUnit:RegisterEvent('spell0_30861', 1, 1)
end
if choix_sorts_30861 == 1 then
pUnit:RegisterEvent('spell1_30861', 1, 1)
end
end

function mob30861_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30861', math.random(1500, 3000), 1)
end

function mob30861_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30861_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30861_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30861, 1, 'mob30861_Action')
RegisterUnitEvent(30861, 2, 'mob30861_Leave')
RegisterUnitEvent(30861, 3, 'mob30861_Kill')
RegisterUnitEvent(30861, 4, 'mob30861_Die')
